package com.haiqi.modules.ship.service;

import com.haiqi.common.persistence.dao.AisShipStaticMapper;
import com.haiqi.common.persistence.entity.AisShipStatic;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by HaiQi on 2017-4-5.
 */
@Service
public class AisShipStaticService {
    @Autowired
    private AisShipStaticMapper aisShipStaticMapper;

    /**
     * 根据船舶名称或者MMSI号码查询船舶
     * @param shipName 船舶名称或MMSI
     * @return
     */
    public List<AisShipStatic> getAllListByShipNameOrMmsi(String shipName){
        List<AisShipStatic> list = aisShipStaticMapper.getListByShipNameOrMmsi(shipName);
        return list;
    }
    public AisShipStatic getShipByMmsi(String mmsi) {
        return aisShipStaticMapper.getShipByMmsi(mmsi);
    }
}
